package cn.gwm.flink.streaming.constant;

/**
 * 电池类型
 *
 * @author GW00283474
 */

public enum CellBatterTypeEnum {

    BATTER_TYPE_LFP("LFP", "磷酸铁锂电池"),
    BATTER_TYPE_NCM("NCM", "三元材料电池");
    private String key;
    private String value;

    CellBatterTypeEnum(String key, String value) {
        this.key = key;
        this.value = value;
    }

    public String getKey() {
        return key;
    }

    public String getValue() {
        return value;
    }

    public String getKeyByValue(String value){
        CellBatterTypeEnum[] values = CellBatterTypeEnum.values();
        for (CellBatterTypeEnum element:values){
            if(value.equals(element.value)){
                return element.key;
            }
        }
        return  null;
    }
}
